/*
 * @Description:
 * @Version: 2.0
 * @Autor: snzo.chen
 * @Date: 2023-11-20 14:44:47
 * @LastEditors: snzo.chen
 * @LastEditTime: 2023-12-14 15:19:13
 */
import { RouteRecordRaw } from 'vue-router';

const moduleName = 'ticket';
const routes: Array<RouteRecordRaw> = [
  {
    path: '/ticket',
    meta: {
      title: '票务管理',
    },
    children: [
      {
        path: 'menu',
        name: `${moduleName}-menu`,
        component: () => import('@/views/ticket/menu/ticket-menu.vue'),
        meta: { title: '一级票类别', keepAlive: true },
      },
      {
        path: 'menuItem/:menuId',
        name: `${moduleName}-menu-item`,
        component: () => import('@/views/ticket/menuItem/ticket-menu-item.vue'),
        meta: { title: '二级票类别', keepAlive: true },
      },
      {
        path: 'package/:menuId/:menuItemId',
        name: `${moduleName}-package`,
        component: () => import('@/views/ticket/package/ticket-package.vue'),
        meta: { title: '项目列表', keepAlive: true },
      },
      {
        path: 'packageItem/:editType/:menuItemId/:id',
        name: `${moduleName}-package-item`,
        component: () => import('@/views/ticket/package/ticket-package-item.vue'),
        meta: { title: '添加/编辑项目' },
      },
      {
        path: 'packageDay/:ticketMenu/:ticketPackageId',
        name: `${moduleName}-package-day`,
        component: () => import('@/views/ticket/packageDay/ticket-package-day.vue'),
        meta: { title: '库存' },
      },
    ],
  },
];

export default routes;
